import React from 'react'
import { Form, Row, Col, Input, Button, Select, InputNumber, Checkbox, Radio, DatePicker } from 'dw-mx';

export default function Type2Child(props) {
    const [form] = Form.useForm();
    const layout = {
        labelCol: { span: 2 },
        wrapperCol: { span: 22 }
    };
    function handleClick() {
        props.closeDialog(form.getFieldsValue())
    }
    return (
        <>
            <Form
                form={form}
                {...layout}
            >
                <Row>
                    <Col span={24}>
                        <Form.Item label="ID" name="id" rules={[{ required: true }]} >
                            <Input defaultValue={props.id} placeholder={"请输入用户ID"} maxLength={10} autoFocus={true} />
                        </Form.Item>
                    </Col>
                </Row>
                <Row>
                    <Col span={24}>
                        <Form.Item label="密码" name="password" rules={[{ required: true }]} >
                            <Input defaultValue={props.password} placeholder={"请输入用户密码"} maxLength={10} autoFocus={false} />
                        </Form.Item>
                    </Col>
                </Row>
            </Form>
            <Button onClick={handleClick}>提交</Button>
        </>
    )
} 